$(function () {
    //常用jQuery对象
    var entity_datagrid = $("#entity_list");
    //==========================================================================
    //封装方法
    var methodObj = {
        //刷新页面
        reloadList: function () {
            entity_datagrid.datagrid("reload");
        }
    }
    //==========================================================================================
    //页面数据加载
    entity_datagrid.datagrid({
        fit: true,
        fitColumns: true,
        url: "/systemLog/query.do",
        singleSelect: "true",
        pagination: true,
        rownumbers: true,
        columns: [[
            {field: 'opUser', title: '操作用户', width: 100, align: "center"},
            {field: 'opTime', title: '操作时间', width: 100, align: "center"},
            {field: 'oplp', title: '操作IP', width: 100, align: "center"},
            {field: 'function', title: '操作内容', width: 100, align: "center"},
            {field: 'params', title: '使用参数', width: 100, align: "center"}
        ]],
        toolbar: "#tools"
    });
    //按钮绑定事件
    $("[data-cmd]").click(function () {
        var cmd = $(this).data("cmd");
        methodObj[cmd]();
    });
});

